package com.atguigu.day12.Test04;

public interface CompareAble {
    default Apple compare(Apple a, Apple b){
        System.out.println("默认挑大的：");
        if(a==(a.getSize()>b.getSize()?a:b))
            System.out.println(a.getSize()+"-"+a.getColor());
        else
            System.out.println(b.getSize()+"-"+b.getColor());
        return a.getSize()>b.getSize()?a:b;
//        System.out.println("默认挑大的：");
//        if(a.getSize() > b.getSize()){
//            System.out.println(a);
//        }else{
//            System.out.println(b);
//        }

    }
}
